import React, { useState } from 'react'

const useClass = () => {
  const [isActive,setIsActive] = useState(false)
  const handleimg = (e) =>{
    e.stopPropagation();
    setIsActive(true)
  }

  const handlebox = ()=> setIsActive(false);
  const imgclass = isActive ? 'active' : '';
  const boxclass = isActive ? 'box' : 'box boxActive'

  return {handlebox,handleimg,imgclass,boxclass}
}

export default useClass